<template>
	<view>
		<custom-nav-sq-xcx :isBack="false" :hasFixedFlag="hasFixedFlag" conCol="#fff" bgColor="sqGk">
			<block slot="content">我的</block>
		</custom-nav-sq-xcx>
		<view class="mySqCover posRel">
			<image class="samePar posAbso ltzero" mode="aspectFill" :src="getStaticFilePath('mine_root_bg.png')"></image>
			<view class="sqCoverCon posAbso" :style="{top:(navHeight) + 'px'}" style="color: #fff;">
				<view class="sqUserInfo spaceBet alignCen">
					<view class="nameInfo hasFlex">
						<view class="sqUserHead flexAll">
							<view class="iconfont icon-sqDefHead"></view>
						</view>
						<!-- <view class="nameInfoCon">
							<view class="name">点击登录</view>
							<view class="smTxt">登录体验更多精彩~</view>
						</view> -->
						<view class="nameInfoCon">
							<view class="name">张珊珊</view>
							<view class="smTxt">黄河路社区</view>
						</view>
					</view>
					<view class="rzZxsBtn hasFlex">
						<view>入驻社区咨询师</view>
						<view>入驻社区倾听师</view>
					</view>
				</view>
				<view class="sqMyMod posAbso hasFlex">
					<view class="sqMyModItem" @tap="goMyFavor">
						<view class="iconfont icon-sqMySc"></view>
						<view class="sqMyModTit">我的收藏</view>
						<view class="modLine"></view>
					</view>
					<view class="sqMyModItem" @tap="goMyBbs">
						<view class="iconfont icon-sqBbs"></view>
						<view class="sqMyModTit">我的帖子</view>
						<view class="modLine"></view>
					</view>
					<view class="sqMyModItem" @tap="goMyYy">
						<view class="iconfont icon-sqBbs"></view>
						<view class="sqMyModTit">我的预约</view>
						<view class="modLine"></view>
					</view>
					<view class="sqMyModItem" @tap="goMyFeedBack">
						<view class="iconfont icon-sqFeedBack"></view>
						<view class="sqMyModTit">我的反馈</view>
					</view>
				</view>
			</view>
		</view>
		<view class="sqMine">
			<view class="rzApply hasFlex">
				<view class="rzApplyItem" @tap="rzApply('zxs')">入住社区咨询师</view>
				<view class="rzApplyItem" @tap="rzApply('qts')">入住社区倾听师</view>
			</view>
			<image class="shRzImg" :src="getStaticFilePath('sqDpRz.png')"></image>
			<view class="sqMineItem" @tap="goMyZxQs">
				<view class="iconBox hasFlex alignCen">
					<image class="imgIcon" :src="getStaticFilePath('myZx.png')"></image>
					<view class="itemTit">咨询倾诉订单</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
			<view class="sqMineItem" @tap="goMyPg">
				<view class="iconBox hasFlex alignCen">
					<image class="imgIcon" :src="getStaticFilePath('myPg.png')"></image>
					<view class="itemTit">我的评估</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
			<view class="sqMineItem" @tap="goMyHd">
				<view class="iconBox hasFlex alignCen">
					<image class="imgIcon" :src="getStaticFilePath('myHd.png')"></image>
					<view class="itemTit">我的活动</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
			<view class="sqMineItem" @tap="goMyZycp">
				<view class="iconBox hasFlex alignCen">
					<image class="imgIcon" :src="getStaticFilePath('myGh.png')"></image>
					<view class="itemTit">我的规划</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
			<view class="sqMineItem">
				<view class="iconBox hasFlex alignCen" @tap="goMyCourse">
					<image class="imgIcon" :src="getStaticFilePath('myKc.png')"></image>
					<view class="itemTit">我的课程</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
			<view class="sqMineItem">
				<view class="iconBox hasFlex alignCen" @tap="goMyResOrder">
					<image class="imgIcon" :src="getStaticFilePath('kcDd.png')"></image>
					<view class="itemTit">课程订单</view>
				</view>
				<view class="iconfont icon-sqArrow"></view>
			</view>
		</view>
		<uni-popup ref="rzApplyPop" :maskClick="false">
			<view class="rzApplyWrap" style="text-align: center;">
				<view class="rzApplyPop">
					<image class="smileImg" :src="getStaticFilePath('rzApply.png')"></image>
					<view class="tips">是否确认申请入驻xx社区{{rzApplyTit}}?</view>
					<button class="comBtn applyRzBtn">申请入驻</button>
				</view>
				<view class="iconfont icon-sqClose" @tap="closeRzApply"></view>
			</view>
		</uni-popup>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				navHeight:getApp().globalData.navHeight,
				rzApplyTit:''
			}
		},
		methods:{
			rzApply(opt){
				this.rzApplyTit = opt == 'zxs' ? '咨询师' : '倾听师';
				this.$refs.rzApplyPop.open();
			},
			closeRzApply(){
				this.$refs.rzApplyPop.close();
			},
			goMyFavor(){
				uni.navigateTo({
					url:'/pages/subSqMine/myFavor/myFavor'
				})
			},
			goMyBbs(){
				uni.navigateTo({
					url:'/pages/subSqMine/myBbs/myBbs'
				})
			},
			goMyYy(){
				uni.navigateTo({
					url:'/pages/subSqMine/myYybs/myYybs'
				})
			},
			goMyFeedBack(){
				uni.navigateTo({
					url:'/pages/subSqMine/myFeedBack/myFeedBack'
				})
			},
			goMyZxQs(){
				uni.navigateTo({
					url:'/pages/subSqMine/myZxOrder/myZxOrder'
				})
			},
			goMyPg(){
				uni.navigateTo({
					url:'/pages/subSqMine/myPg/myPg'
				})
			},
			goMyHd(){
				uni.navigateTo({
					url:'/pages/subSqMine/myHd/myHd'
				})
			},
			goMyZycp(){
				uni.navigateTo({
					url:'/pages/subSqMine/myZyCp/myZyCp'
				})
			},
			goMyCourse(){
				uni.navigateTo({
					url:'/pages/subSqMine/myCourse/myCourse'
				})
			},
			goMyResOrder(){
				uni.navigateTo({
					url:'/pages/subSqMine/myCourse/myCourseOrder'
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.rzApplyWrap{
		text-align: center;
		.rzApplyPop{
			width: 520rpx;
			height: 560rpx;
			background: #fff;
			border-radius: 16rpx;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			font-size: 28rpx;
			color: $sq-main0;
			.smileImg{
				width: 180rpx;
				height: 180rpx;
				margin-bottom: 60rpx;
			}
			.applyRzBtn{
				width: 300rpx;
				height: 80rpx;
				line-height: 80rpx;
				background: $pss-sq-main;
				font-size: 28rpx;
				margin-top: 50rpx;
			}
		}
		.icon-sqClose{
			font-size: 36px;
			color: #fff;
			margin-top: 15rpx;
		}
	}
	.rzApply{ 
		margin-bottom: 30rpx;
		.rzApplyItem{
			flex: 1;
			height: 130rpx;
			line-height: 130rpx;
			border-radius: 16rpx;
			background: linear-gradient(90deg, rgba(254, 222, 228, 1) 0%, rgba(209, 217, 251, 1) 100%);
			font-size: 30rpx;
			color: $pss-sq-main-bg;
			font-weight: 600;
			text-align: center;
			&:first-child{
				margin-right: 20rpx;
			}
		}
	}
	.mySqCover{
		width: 100%;
		height: 960rpx;
		.sqCoverCon{
			left: 30rpx;
			right: 30rpx;
			bottom: 330rpx;
		}
		.sqUserHead{
			width: 110rpx;
			height: 110rpx;
			background: #bf83ff;
			border-radius: 50%;
			margin-right: 15rpx;
			.icon-sqDefHead{
				font-size: 60rpx;
			}
		}
		.name{
			font-size: 30rpx;
			font-weight: 600;
			margin: 15rpx 0;
		}
		.smTxt{
			opacity: .6;
			font-size: 26rpx;
		}
		.rzZxsBtn{
			padding: 0 20rpx;
			height: 70rpx;
			line-height: 70rpx;
			background: linear-gradient(270deg, rgba(191, 131, 248, 1) 0%, rgba(109, 58, 218, 1) 100%);
			font-size: 24rpx;
			border-radius: 16rpx;
		}
		.sqMyMod{
			border-radius: 30rpx;
			background: rgba(34,34,34,.2);
			backdrop-filter: blur(4px);
			padding-bottom: 30rpx;
			left: 0;
			right: 0;
			bottom:0rpx;
			.sqMyModItem{
				flex: 1;
				text-align: center;
				font-size: 28rpx;
				position: relative;
				.iconfont{
					height: 80rpx;
					margin-bottom: 10rpx;
					font-size: 56rpx;
					display: flex;
					align-items: flex-end;
					justify-content: center;
					&.icon-sqMySc{
						color: #c4a3fc;
					}
					&.icon-sqBbs{
						color: #f5c651;
					}
					&.icon-sqFeedBack{
						color: #d9eeb6;
					}
				}
				.modLine{
					width: 2rpx;
					height: 40%;
					position: absolute;
					right: 0;
					top: 40%;
					background: rgba(255,255,255,.2);
				}
			}
		}
	}
	.sqMine{
		background: #fff;
		border-radius: 30rpx 30rpx 0 0;
		padding: 30rpx;
		position: relative;
		z-index: 2;
		margin-top: -300rpx;
		.shRzImg{
			width: 100%;
			height: 160rpx;
			margin-bottom: 30rpx;
		}
		.sqMineItem{
			background: $sq-fuf;
			border-radius: 16rpx;
			height: 100rpx;
			padding: 0 20rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			font-size: 28rpx;
			color: #000;
			font-weight: 600;
			margin-bottom: 30rpx;
			&:last-child{
				margin-bottom: 0;
			}
			.imgIcon{
				width: 72rpx;
				height: 72rpx;
				margin-right: 20rpx;
			}
			.icon-sqArrow{
				font-weight: normal;
				color: 32rpx;
			}
		}
	}
</style>